
import math

def isPrime(num):
    for i in range(2,int(math.sqrt(num))+1):
        if num % i == 0:
            print("%d不是素数" % num)
            break
    else:
        print("%d是素数" % num)

while True:
   inputNumber = input("请输入:")
   if inputNumber.isdigit():
       isPrime(int(inputNumber))
   else:
       print("输入的是字符串")
